package com.sky.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.entity.SetmealDish;
import com.sky.vo.SetmealDishVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper extends BaseMapper<SetmealDish> {
    @Select("select dish_id from setmeal_dish where dish_id=${id}")
    Long getSetmealDishIdsByDishIds(Long id);
    /*
    * 查询套餐内起售菜品的个数
    * */
    int fromSetmealToSetmealDishToDish(Long id);

    /*
    * 获取套餐内包含的餐品信息，用于客户端
    * */
    List<SetmealDishVO> getDishes(Integer id);
}
